package com.forum.mapper;

import com.forum.annotation.AutoFill;
import com.forum.dto.NoticeDTO;
import com.forum.entity.Notifications;
import com.forum.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
@Mapper
public interface NoticeMapper {


    @Select("select * from notifications")
    Notifications query();

    @AutoFill(OperationType.INSERT)
    void publish(NoticeDTO noticeDTO);

    void deleteById(List<Long> ids);

    void updateById(NoticeDTO noticeDTO);
}
